package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IDeviceConfigDAO;
import org.jsbd.boss.domian.channel.ApkDevice;
import org.jsbd.boss.domian.channel.MobileClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class DeviceConfigDAOImpl extends CrackBaseDao implements IDeviceConfigDAO {
	public static final Logger LOGGER = LoggerFactory.getLogger(DeviceConfigDAOImpl.class);

	@Override
	public List<ApkDevice> selectDevices(Integer apkId) {
		return super.queryForList("qy_apk_device_config.GET_APK_DEVICE_LIST", apkId);
	}


	@Override
	public List<ApkDevice> selectAllDevices() {
		return super.queryForList("qy_apk_device_config.SELECT_ALL_DEVICE_LIST");
	}



	@Override
	public Integer insertDevice(ApkDevice apkDevice) {
		return (Integer) super.insert("qy_apk_device_config.INSERT_APK_DEVICE", apkDevice);
	}

	@Override
	public void insertApkDevices(List<ApkDevice> deviceList) {
		super.batchInsert("qy_apk_device_config.INSERT_APK_DEVICE", deviceList);
	}

	@Override
	public Integer delApkDevices(Integer apkId) {
		return super.delete("qy_apk_device_config.DELETE_APK_DEVICE", apkId);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.jsbd.boss.dao.IDeviceDAO#selectMobileClients(java.lang.String)
	 */
	@Override
	public List<MobileClient> selectMobileClients(String mark) {
		return super.queryForList("qy_apk_device_config.GET_MOBILECLIENT_LIST", mark);
	}

}
